function none(val) {
	_showtoast(val, 'none', func)
}

function success(val) {
	_showtoast(val, 'success', func)
}

function error(val, func) {
	_showtoast(val, 'error', func)
}

function _showtoast(title, icon = "none", func = () => {}) {
	uni.showToast({
		title: title,
		duration: 2000,
		icon: icon,
		success(res) {
			func(res)
		}
	})
}

function model(title, content) {
	uni.showModal({
		title,
		content
	})
}
export default {
	none,
	success,
	error,
	model
}
